import { Prop } from 'vue-property-decorator';
import { PanelContentComponentProvider, PanelDataProvider } from '../../interface';
import { PanelController } from '../../panel-controller';
import { BasicComponent } from '../basic-compoent/basic-compoent';

/**
 * 内容项基础组件
 *
 * @author chitanda
 * @date 2022-02-17 18:02:48
 * @export
 * @class ContentItemBasicComponent
 * @extends {BasicComponent}
 */
export class ContentItemBasicComponent extends BasicComponent implements PanelContentComponentProvider {
  @Prop()
  data!: PanelDataProvider;

  /**
   * 发送删除自己事件
   *
   * @author chitanda
   * @date 2022-02-18 16:02:59
   */
  removeSelf(): void {
    this.$emit('remove-item', this.data);
  }
}
